home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / make / icmake-6.000 / icmake-6 / icmake / exec / funyoung.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-08  |  874 b   |  40 lines

  1. /*
  2. \funcref{fun\_younger}{void fun\_younger ()}
  3.     {}
  4.     {}
  5.     {pop(), younger(), discard()}
  6.     {fun\_younger()}
  7.     {funyoung.c}
  8.     {
  9.         This function is executed when an {\em op\_younger} opcode is found in
  10.         the binary makefile. Two variables are popped and their {\em vu.str}
  11.         fields are used as file names to compare two files. The result of the
  12.         comparison is pushed as an {\em e\_int} variable.
  13.  
  14.         Note that the right operand of the {\em younger} operator is popped
  15.         first since the left operand is expected to be pushed first.
  16.     }
  17. */
  18.  
  19. #include "icm-exec.h"
  20.  
  21. void fun_younger ()
  22. {
  23.     VAR_
  24.         rval,
  25.         lval,
  26.         tmp;
  27.  
  28.     tmp.type = e_int;
  29.  
  30.     rval = pop ();
  31.     lval = pop ();
  32.  
  33.     tmp.vu.intval = younger (lval.vu.i->ls.str, rval.vu.i->ls.str);
  34.  
  35.     discard (rval);
  36.     discard (lval);
  37.  
  38.     push (tmp);
  39. }
  40.